package com.sun.service;

import com.sun.dto.TagAndAmount;
import com.sun.pojo.Tag;
import com.sun.pojo.Type;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author: glorysun
 * @date: 2020/8/5
 */
public interface TagService {

    int insertTag(Tag tag);   //新增标签

    Tag selectTagById(Long id);  //根据id查询标签

    Tag selectTagByName(String name);  //根据标签名查询标签

    List<Tag> selectTagList();  //分页查询标签

    int updateTag(Tag tag);     //更新标签

    int deleteTag(Long id);    //删除标签

    List<TagAndAmount> selectTagAndAmount();    //查询标签以及博客数量
}
